pub fn goldbach_conjecture() -> u64 {
    const UPPER_BOUND: u64 = 1e6 as u64;
    let mut ans = 0;
    let mut found_cnt = 0;
    let mut odd_primes: [bool; (UPPER_BOUND >> 1) as usize] = [true; (UPPER_BOUND >> 1) as usize];
    for i in (3..UPPER_BOUND as usize).step_by(2) {
        // 检查奇数
        if odd_primes[i >> 1] {
            // 素数的情况
            for j in (i*i..UPPER_BOUND as usize).step_by(i << 1) {
                odd_primes[j >> 1] = false;
            }
        } else {
            // 合数的情况
            let mut flag = false;
            // 尝试写成一个素数和一个平方的两倍之和
            for j in 1..i {
                if 2 * j * j >= i {
                    break;
                }
                if odd_primes[(i - 2 * j * j) >> 1] {
                    flag = true;
                    break;
                }
            }
            if !flag {
                ans += i as u64;
                found_cnt += 1;
                if found_cnt == 2 {
                    break;
                }
            }
        }
    }
    if found_cnt < 2 {
        println!("Not found under {}, please increase the upper bound.", UPPER_BOUND);
    }
    ans
}
